<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>prompt()的用法</title>
</head>
<body>
    <script type="text/javascript">
        //prompt():用于显示可提示用户进行输入的对话框
        function disp_prompt(){
        	var name = prompt('请输入您的姓名',"");
        	if(name!=null && name!=" Lucy"){
        		document.write('欢迎你:' + name + '!!!!!!!!!');
        	}
        }


    </script>

   <!-- Display a prompt box:显示提示框 -->
   <input type="button" onclick="disp_prompt()" value="Display a prompt box"/>
	
</body>
</html>